<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';

const name = ref("")
const passw = ref("")
const router = useRouter()
function login(){
    router.replace("/home")
}

</script>

<template>
  <h2>登录</h2>
  <input type="text" placeholder="姓名" v-model="name">
  <input type="text" placeholder="密码" v-model="passw">
  <button @click="login">登录</button>
</template>
